<template>
    <div class="lg-steps">
        <div class="lg-steps-line"></div>
        <div v-for="index in count" class="lg-step"
        :key="index"
        :style="{color:index <= active?activeColor:defaultColor}">
            {{index}}
        </div>
    </div>
</template>
<script>
export default {
    name:'lg-step',
    props:{
        count:{
            type:Number,
            default:3
        },
        active:{
            type:Number,
            default:1
        },
        activeColor:{
            type:String,
            default:'red'
        },
        defaultColor:{
            type:String,
            default:'green'
        }
    }
}
</script>
<style scoped>
.lg-steps {
  position: relative;
  display: flex;
  justify-content: space-between;
}

.lg-steps-line {
  position: absolute;
  height: 2px;
  top: 50%;
  left: 24px;
  right: 24px;
  transform: translateY(-50%);
  z-index: 1;
  background: rgb(223, 231, 239);
}

.lg-step {
  border: 2px solid;
  border-radius: 50%;
  height: 32px;
  width: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 700;
  z-index: 2;
  background-color: white;
  box-sizing: border-box;
}
</style>